package io.github.dunwu.javacore.method;

/**
 * @author Zhang Peng
 * @date 2019-03-16
 */
public class ConstructorMethodDemo {

	public static void main(String[] args) {
		Person person = new Person("jack");
		System.out.println("person name is " + person.getName());
	}

	static class Person {

		private String name;

		public Person(String name) {
			this.name = name;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

	}

}
